<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button>测试</button>
<div id="root">

</div>
</body>
<script>
  Object.prototype.lastListObj = function (){
      let arr = this
      if (arr instanceof Array){
          return arr[arr.length]
      }
     return ''
  }

  let a = [1,2,3]
  console.log(a.lastListObj())
</script>
</html>